

#pragma once

#include <string>
#include "unit.h"


class Soldier : public Unit {
public:
	Soldier();
	virtual ~Soldier();

	virtual void set(const string& name, const Point& pos, GamePlayScene* scene);
	virtual bool update(float ticks);
	void setFlag(Flag* flag);

	virtual void regroup();

protected:
	virtual void handleStateBirth(float ticks);
	virtual void handleStateWalk(float ticks);
	virtual void handleStateWork(float ticks);
	virtual void handleStateStand(float ticks);
	virtual void handleStateMelee(float ticks);
	virtual void handleStateShoot(float ticks);
	virtual void handleStateCast(float ticks);
	virtual void handleStateReload(float ticks);
	virtual void handleStateDying(float ticks);

	virtual void attack();
	virtual void shoot();
	virtual void cast();

	virtual bool move(float ticks);

	virtual void onAttack(EventData* event);

	Sprite* createRangeCircle();

public:
	int myPositionIndex;
	Sprite* rangeCircle;

protected:

};